<%--
    Document   : manutencaoCategoria
    Created on : 18/09/2009, 16:00:19
    Author     : fabricio
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="./css/default.css" type="text/css" rel="stylesheet" >
        <link href="./css/style.css" type="text/css" rel="stylesheet" />
        <title>${titulo}</title>
    </head>
    <body>

        <div id="container">

            <!-- importa o header para a página -->
            <jsp:include page="../header.jsp" />
            <jsp:include page="../menuSuperior.jsp" />

            <div id="main">

                <div id="content">
                    <table cellspacing="0" cellspadding="0">
                        <tr>
                            <td class="tdListaTitulo">Id</td>
                            <td class="tdListaTitulo">Nome</td>
                            <td class="tdListaTitulo">Selecione</td>
                        </tr>

                        <c:url var="Inserir" value="/FrontController?action=CrudRedirect" scope="page">
                            <c:param name="acao" value="inserirCategoria"/>
                            <c:param name="classe" value="Category"/>
                            <c:param name="id" value="-1"/>
                        </c:url>
                        <a href="${Inserir}">Inserir Categoria</a>
                        <form action="FrontController?action=CrudRedirect" method="post">
                            <c:forEach items="${categorias}" var="categoria" begin="0">

                                <tr>
                                    <td class="tdLista">${categoria.id}</td>
                                    <td class="tdLista">${categoria.categoria}</td>
                                    <td class="tdListaOpcao"><input name="id" type="radio" value="${categoria.id}" /></td>
                                </tr>

                            </c:forEach>
                            <tr>
                                <td colspan="3" class="tdListaBotao">
                                    <input type="hidden" value="Category" name="classe"/>
                                    <input type="submit" value="alterarCategoria" name="acao"/>
                                    <input type="submit" value="deletarCategoria" name="acao"/>
                                </td>
                            </tr>
                        </form>
                    </table>
                </div>

                <!-- importa o menu para a página -->
                <jsp:include page="../menu.jsp" />

            </div>
        </div>
        <div class="clear"></div>
        <div id="footer">
            <p>&copy; Trabalho 7o Per&iacute;odo<br /><a href="http://gregdev.net">Designed by Greg Smith</a></p>
        </div>
        <hr size="1px" />
    </body>
</html>

